#!/usr/bin/python
#! encoding:utf-8

import sys
import os
#import json

#os.system("ls /dev | grep '^ttyUSB'")
tmp = os.popen("ls /dev | grep '^ttyUSB'").readlines()
print "Content-Type: application/json"
print "{"
for i in tmp:
	if not os.path.exists('/mnt/sda1/ttyusb/'+i.strip('\n')):
		os.system("updatettyusb "+i.strip('\n'))
		#print "update the file:"+i.strip('\n')
	print(i.strip('\n')+':900,')
#print(tmp)
print "}"